package io.xiyou.rpcfx.bean;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @ClassName：这个主要是模拟spring容器
 * @Author：西柚
 * @Date：2021/10/8 1:53 下午
 * @Versiion：1.0
 */
public class RpcBeanFactory {

    private static Map<String, Object> beanMap = new ConcurrentHashMap<>();

    public static Object getBean(String beanName) {
        return beanMap.get(beanName);
    }

    public static void putBean(String beanName, Object object) {
        beanMap.put(beanName, object);
    }
}
